﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dune2013.Behaviors;

namespace Dune2013
{
    public class CargadoBehavior:Behavior
    {
        public CargadoBehavior() :
            base(){
                typeBehavior = TypeBehavior.Estado;
            }
        public override void execute(int dTime, Actor act)
        {
            if (act is Recolector)
            {
                Recolector rec = (Recolector)act;
                if (rec.nafta <= 0)
                {
                    act.interruptBehavior(new IrCargarNaftaBehavior());
                }
            }
            base.execute(dTime, act);
        }
    }
}
